package com.example.java8;

import com.example.java8.common.Employee;
import org.junit.Test;

import java.util.Optional;

/**
 * @Classname MainTest
 * @Description TODO
 * @Date 2020/11/1 3:24
 * @Created by kevin
 */
public class MainTest {

    private Employee employee = new Employee(1L, "kevinTian", 30, 15000.0);

    @Test
    public void test01() {

        Optional<Employee> empty = Optional.empty();
        System.out.println(empty);

        Optional<Optional<Employee>> empty1 = Optional.of(empty);
        System.out.println(empty1);

        Optional<Employee> o = Optional.ofNullable(null);
        System.out.println(o);

        Optional<Optional<Employee>> empty2 = Optional.ofNullable(empty);

        System.out.println(empty2);
    }
}
